package com.chickenhouse.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import com.chickenhouse.pojo.Version;
import com.chickenhouse.repository.VersionRepository;
import com.chickenhouse.service.VersionService;
@Service
public class VersionServiceImpl implements VersionService{
	@Resource
	private VersionRepository versionRepository;
	public List<Version> getAll() {
		System.out.println(versionRepository.queryAll().size());
		return versionRepository.queryAll();
	}

	public int add(Version version) {
		return versionRepository.add(version);
	}

	public List<Version> getAllById(@Param("ch_hencoop_id") int ch_hencoop_id) {
		return versionRepository.getAllById(ch_hencoop_id);
	}

	
}
